﻿using Terraria;
using Terraria.ModLoader;

namespace WorseGame.Content.Prefixes
{
    public class Volatile : ModPrefix
    {
        public override PrefixCategory Category => PrefixCategory.Custom;

        public override void ModifyValue(ref float valueMult)
        {
            valueMult *= 0f;
        }

        public override bool CanRoll(Item item)
        {
            return item.DamageType == DamageClass.Magic || item.DamageType == DamageClass.Summon;
        }

        public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus)
        {
            damageMult *= 0.85f;
            useTimeMult *= 1.10f;
            critBonus -= 5;
            manaMult *= 1.10f;
            knockbackMult *= 0.85f;
        }
    }
}
